package me.idashu.attg.service;

import java.util.List;
import java.util.Map;

import me.idashu.attg.domain.PicEntity;
import me.idashu.attg.persistence.PicMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PicService {
    @Autowired
    private PicMapper picMapper;
    
    public void insertPicEntity(PicEntity picEntity){
    	picMapper.insertPicEntity(picEntity);
    }
    
    public List<PicEntity> getListPicEntityToGoods(Map<String, Object> map){
    	List<PicEntity> listPic = picMapper.getListPicEntityToGoods(map);
    	return listPic;
    }
    
    public List<PicEntity> getListPicEntityFromMember(int memberId){
    	List<PicEntity> listPic = picMapper.getListPicEntityFromMember(memberId);
    	return listPic;
    }
    
    public int getCountListPicEntityToGoods(PicEntity picEntity){
    	int count = picMapper.getCountListPicEntityToGoods(picEntity);
    	return  count;
    }
    
    public void deletePicEntity(int picId){
    	picMapper.deletePicEntity(picId);
    }
}
